home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User: China
/
Acorn User China CD-ROM (UK) (Disc B)
/
Acorn User China CD-ROM (UK) (Disc B).bin
/
STUTTGART
/
FROMUTS
/
UNIXLIB37B
/
test_c_unamtest
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-02-24
|
270 b
|
19 lines
#include <stdio.h>
#include <string.h>
#include "sys/unix.h"
int main()
{
int l;
char b[81];
while (fgets(b,256,stdin))
{
l = strlen(b) - 1; if (l >= 40) l = 39; b[l] = 0;
strncpy(b + 40,__uname(b,0),39); b[80] = 0;
memset(b + l,' ',40 - l);
puts(b);
}
}